# 配置Django Server运行环境
# 使用官方的Ubuntu 22.04镜像作为基础镜像
FROM python:3.8
ENV PYTHONUNBUFFERED 1
RUN echo python -V
RUN mkdir /opt/pycode /var/lib/mysql
WORKDIR /opt/pycode
COPY ./DjangoApp/ /opt/pycode

# download from one temporary data souce
RUN pip install  -i https://mirrors.aliyun.com/pypi/simple/ --upgrade pip 
RUN pip3 install --index-url https://mirrors.aliyun.com/pypi/simple/ --no-cache-dir -r /opt/pycode/requirements.txt

# CMD [ "/bin/sh", "/proj_django/start.sh" ]